package org.dzq.designmode.decorator;

import com.alibaba.fastjson2.JSONObject;
import org.slf4j.Logger;

/**
 * @ClassName: JsonLogger
 * @Package: org.dzq.designmode.decorator
 * @author: 越
 * @date: 2023/6/14 20:35
 * @Description:
 */
public class JsonLogger extends LoggerDecorator{

    public JsonLogger(Logger logger) {
        super(logger);
    }

    @Override
    public void info(String s) {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("info",s);
        logger.info(jsonObject.toString());
        System.out.println("JsonLogger info()");
    }
}
